using System;
using Headspring.Training.Core.Model;
using NUnit.Framework;
using Rhino.Mocks;

namespace Headspring.Training.UnitTests.Model
{
	[TestFixture]
	public class ManagerTester
	{
		[Test]
		public void ShouldReturnCorrectEmailWhenCallingGetRejectAddress()
		{
			var secretary = MockRepository.GenerateStub<Secretary>();
			secretary.Stub(
				secretary1 => secretary.GetRejectEmail(DayOfWeek.Wednesday)).
				Return("secretary@email.com");
			var manager1 = new Manager("Lee", "Lee", "Brandt", "e@mail.com", secretary);
			var manager2 = new Manager("Phil", "Phil", "Jensen", "My@mail.com", null);

			Assert.AreEqual("secretary@email.com",
			                manager1.GetRejectEmail(DayOfWeek.Wednesday));
			Assert.AreEqual("My@mail.com", manager2.GetRejectEmail(DayOfWeek.Wednesday));
		}
	}
}